import axios from '../utils/index';
import { Pat } from '@/typings/request';
const feedbackApi = {
    feedbackList(params: Pat, callback: (T: any) => void) {
        axios
            .get(`/oa/feedback/getFeedBackPageList`, {
                params,
                headers: {
                    'Content-Type': 'application/x-www-form-urlencoded',
                },
            })
            .then(res => {
                callback(res.data);
            })
            .catch(err => {
                callback(err);
            });
    },
    feedbackClose(feedbackId: string, data: Pat, callback: (T: any) => void) {
        axios
            .put(`/oa/feedback/closeFeedBack/${feedbackId}`, data)
            .then(res => {
                callback(res.data);
            })
            .catch(err => {
                callback(err);
            });
    },
};

export default feedbackApi;
